PDF.co icon

PDF.co

Automate document workflows with OCR, AI invoice parsing, data extraction, conversion, form filling, merging/splitting, and barcode processing. Ideal for invoices, forms, and scanned files.

PDF Security

AI-generated

Summary

Add or remove security restrictions to a PDF file by specifying its source URL, applying encryption and password protections, or providing the password to remove existing security.

Inputs

  • Authentication — Select authentication method: OAuth2 or API Key.
  • PDF URL (required) — URL of the source PDF file to secure or unsecure.
  • Operation Mode (required) — Choose between adding security or removing security from the PDF.
  • Owner Password — Owner password to encrypt document and set restrictions; required when adding security.
  • User Password — Optional password required for viewing or printing; applicable when adding security.
  • Password For Remove Security (required) — Password (owner or user) needed to remove PDF security restrictions.
  • Advanced Options (Add Security) — Various booleans to allow or restrict accessibility support, annotation modification, content extraction, document assembly, modification, form filling, printing; encryption algorithm choice; output file name; output link expiration; print quality; callback URL; and custom JSON profile for processing.
  • Advanced Options (Remove Security) — Options for output file name, callback URL, output link expiration, and custom JSON profile when removing security.

Output shape

a single record

Returns metadata and URL of the processed PDF file with updated security settings. Output link expires according to specified expiration time. A webhook callback URL can be used to receive processed data asynchronously.

Examples

Example 1: Add security to a PDF

Provide the PDF URL, select Add Security mode, supply owner and optionally user passwords, and configure advanced permissions and encryption algorithm as needed.

Example 2: Remove security from a PDF

Provide the PDF URL, select Remove Security mode, supply the owner or user password for unlocking, and optionally customize output file name and callback.

Links

Discussion